/*
 * create:2016年4月8日 上午10:02:02
 * author:wangds  
 */
package com.cxkj.shop.model.shoppingcart;

import java.util.Collection;
import java.util.LinkedList;

import com.cxkj.shop.model.Entity;
import com.cxkj.shop.model.user.User;

import net.wangds.common.GeneralParentObject;

/**
 * .
 * @author wangds
 *
 */
public class ShoppingCart extends GeneralParentObject implements Entity{

  /**
   * ShoppingCart.java.
   * @author wangds 2016年4月8日 上午10:03:42.
   */
  private static final long serialVersionUID = 8452875845156653492L;

  private Collection<CommodityItem> commodities = new LinkedList<CommodityItem>();
  private Collection<CommodityItem> grouppayments = new LinkedList<CommodityItem>();
  private Collection<CommodityItem> timelimitpayments = new LinkedList<CommodityItem>();
  private Collection<CommodityItem> scorepayments = new LinkedList<CommodityItem>();

  private User user;
  
  private boolean ofo=false, tfo=false;//one free one, three free one
  
  protected ShoppingCart(){
    super();
  }

  /**
   * The getter method of the property commodities.
   * @author wangds 2016年4月8日 上午11:04:02.
   * @return the commodities.
   */
  protected Collection<CommodityItem> getCommodities() {
    return commodities;
  }

  /**
   * The setter method of the property commodities.
   * @param thecommodities the commodities to set
   * @author wangds 2016年4月8日 上午11:04:02.
   */
  protected void setCommodities(Collection<CommodityItem> commodities) {
    this.commodities = commodities;
  }

  /**
   * The getter method of the property grouppayments.
   * @author wangds 2016年4月26日 上午10:51:30.
   * @return the grouppayments.
   */
  protected Collection<CommodityItem> getGrouppayments() {
    return grouppayments;
  }

  /**
   * The setter method of the property grouppayments.
   * @param thegrouppayments the grouppayments to set
   * @author wangds 2016年4月26日 上午10:51:30.
   */
  protected void setGrouppayments(Collection<CommodityItem> grouppayments) {
    this.grouppayments = grouppayments;
  }

  /**
   * The getter method of the property timelimitpayments.
   * @author wangds 2016年4月26日 上午10:51:30.
   * @return the timelimitpayments.
   */
  protected Collection<CommodityItem> getTimelimitpayments() {
    return timelimitpayments;
  }

  /**
   * The setter method of the property timelimitpayments.
   * @param thetimelimitpayments the timelimitpayments to set
   * @author wangds 2016年4月26日 上午10:51:30.
   */
  protected void setTimelimitpayments(Collection<CommodityItem> timelimitpayments) {
    this.timelimitpayments = timelimitpayments;
  }

  /**
   * The getter method of the property scorepayments.
   * @author wangds 2016年4月26日 下午12:39:07.
   * @return the scorepayments.
   */
  protected Collection<CommodityItem> getScorepayments() {
    return scorepayments;
  }

  /**
   * The setter method of the property scorepayments.
   * @param thescorepayments the scorepayments to set
   * @author wangds 2016年4月26日 下午12:39:07.
   */
  protected void setScorepayments(Collection<CommodityItem> scorepayments) {
    this.scorepayments = scorepayments;
  }

  /**
   * .
   * @author wangds 2016年4月27日 下午5:24:31.
   * @param selectUserByOpenId
   */
  public void setUser(User user) {
    this.user=user;
  }
  
  public User getUser(){
    return this.user;
  }

  /**
   * The getter method of the property ofo.
   * @author wangds 2016年5月5日 下午12:31:50.
   * @return the ofo.
   */
  public boolean isOfo() {
    return ofo;
  }

  /**
   * The setter method of the property ofo.
   * @param theofo the ofo to set
   * @author wangds 2016年5月5日 下午12:31:50.
   */
  public void setOfo(boolean ofo) {
    this.ofo = ofo;
  }

  /**
   * The getter method of the property tfo.
   * @author wangds 2016年5月5日 下午12:31:50.
   * @return the tfo.
   */
  public boolean isTfo() {
    return tfo;
  }

  /**
   * The setter method of the property tfo.
   * @param thetfo the tfo to set
   * @author wangds 2016年5月5日 下午12:31:50.
   */
  public void setTfo(boolean tfo) {
    this.tfo = tfo;
  }
  
  
  
}
